<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>小程序商品信息管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../assets/layui/layui-v2.5.4/css/layui.css"  media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<style>
    .layui-table-cell{
        height: 50px;
        line-height: 50px;
    }

    #ss{
        background-color: #F2F2F2;
        padding: 5px;
        width: 97.5%;
        margin: 10px auto 0 auto;
        border: solid 1px #E6E6E6;
    }


</style>
<script src="../assets/js/jquery-3.4.1.min.js"></script>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js" media="all"></script>
<script src="../assets/layui/layui-v2.5.4/layui.js" charset="utf-8"></script>
<body>

<div class="layui-row" id="ss">
    <div class="layui-col-xs12">
        <div class="input-group">
            <div class="layui-col-xs1 layui-col-lg-offset4">
                    <select  style="width: 134px; height: 38px; color: #757575; background-color:#fff;  border: 1px solid #E6E6E6;" id="gt" name="goodsType" class="form-control gt">
                        <!--<option value="">商品分类</option>-->
                        <!--  <option value="1">坚果</option>
                          <option value="2">鲜果</option>
                          <option value="3">有机</option>-->
                    </select>
            </div>
            <div class="layui-col-xs3">
                <input  type="text" id="mh" name="title" required  lay-verify="required" placeholder="请输入搜索内容" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-col-xs1">
                <button id="mh_select" value="" style="height: 36px;margin-top: 1px;width: 60px" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="mh_select">搜索</button>
           </div>
            <div class="layui-col-xs1 layui-col-lg-offset2">
                <a  href="home.html" style="height: 36px;margin-top: 1px;margin-left: 51px;width: 70px;padding: 3px 0px 0px 0px;" class="layui-btn layui-btn-normal layui-btn-sm" >返回首页</a>
            </div>
        </div>
    </div>
</div>


<div class="layui-fluid">
    <!--<fieldset class="layui-elem-field layui-field-title">
      <legend>流体容器（宽度自适应，不固定）</legend>
    </fieldset>-->

    <div class="layui-row">
        <div class="layui-col-sm12  ">
            <div class="grid-demo grid-demo-bg1">
                <table class="layui-hide" id="wxGoods_table"  lay-data="{id:'wxGoods_table'}"  lay-filter="wxGoods_table"></table>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">

    $(function () {
        queryWxGoodsType();
    });
    function queryWxGoodsType() {
        $.ajax({
            type:"get",
            url:"/wxGoods/queryWxGoodsType",
            success:function (result) {
                var   goodsType="";
                $.each(result,function (i,r) {
                   goodsType = '<option value='+r.id+'>'+r.goods_type_name+'</option>';
                    $("#gt").append(goodsType);
                });
            }
        });
    }
</script>

<script type="text/html" id="toolbar">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <div class="input-group">
                <div class="layui-col-xs6">
                    <button id="addGoods" value="添加商品" style="height: 35px;margin-top: 1px;" class="layui-btn layui-btn-normal layui-btn-sm"  lay-event="addGoods" >添加商品</button>
                    <button id="delGoods" value="删除商品" style="height: 35px;margin-top: 1px;" class="layui-btn layui-btn-normal layui-btn-sm"  lay-event="delGoods" >删除商品</button>
                </div>
             <!--   <div class="layui-col-xs1">
                    <div class="input-group" >
                        <select id="gt" name="goodsType" class="form-control gt">
                            <option value="">商品分类</option>
                          &lt;!&ndash;  <option value="1">坚果</option>
                            <option value="2">鲜果</option>
                            <option value="3">有机</option>&ndash;&gt;
                        </select>
                    </div>
                </div>
                <div class="layui-col-xs3">
                    <input type="text" id="mh" name="title" required  lay-verify="required" placeholder="请输入搜索内容" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-col-xs1">
                    <button id="mh_select" value="" style="height: 36px;margin-top: 1px;width: 60px" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="mh_select">搜索</button>
                </div>-->
            </div>
        </div>
    </div>
</script>

<script type="text/html" id="imgtmp">
<img src="{{d.img}}" style="height: 50px ;width: 50px">
</script>

<script type="text/html" id="operations">
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
    <!--<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="addRole">上架</a>-->
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="start">
    {{#  if(d.start == 1){ }}
    <button type="button" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal" lay-event="start">上架</button>
    {{#  } else { }}
    <button style="background:#F2F2F2 ; color: #C9C9C9" type="button" class="layui-btn layui-btn-sm layui-btn-radius " lay-event="start">下架</button>
    {{#  } }}
</script>

<script src="../assets/layui/layui-v2.5.4/layui.js" charset="utf-8"></script>
<script src="../assets/js/pages-js/wxGoods.js" charset="utf-8"></script>
</html>